package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BookingMiniProgramConfigMapper;
import com.ruoyi.system.domain.BookingMiniProgramConfig;
import com.ruoyi.system.service.IBookingMiniProgramConfigService;

/**
 * 预订小程序设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-16
 */
@Service
public class BookingMiniProgramConfigServiceImpl implements IBookingMiniProgramConfigService
{
    @Autowired
    private BookingMiniProgramConfigMapper bookingMiniProgramConfigMapper;

    /**
     * 通过id查询预订小程序设置
     *
     * @param id 预订小程序设置主键
     * @return 预订小程序设置
     */
    @Override
    public BookingMiniProgramConfig selectBookingMiniProgramConfigById(Long id)
    {
        return bookingMiniProgramConfigMapper.selectBookingMiniProgramConfigById(id);
    }

    /**
     * 查询预订小程序设置列表
     *
     * @param storeName 门店名称
     * @return 预订小程序设置
     */
    @Override
    public List<BookingMiniProgramConfig> selectBookingMiniProgramConfigListByName(String storeName)
    {
        return bookingMiniProgramConfigMapper.selectBookingMiniProgramConfigListByName(storeName);
    }

    /**
     * 新增预订小程序设置
     *
     * @param bookingMiniProgramConfig 预订小程序设置
     * @return 结果
     */
    @Override
    public int insertBookingMiniProgramConfig(BookingMiniProgramConfig bookingMiniProgramConfig)
    {
        return bookingMiniProgramConfigMapper.insertBookingMiniProgramConfig(bookingMiniProgramConfig);
    }

    /**
     * 修改预订小程序设置
     *
     * @param bookingMiniProgramConfig 预订小程序设置
     * @return 结果
     */
    @Override
    public int updateBookingMiniProgramConfig(BookingMiniProgramConfig bookingMiniProgramConfig)
    {
        return bookingMiniProgramConfigMapper.updateBookingMiniProgramConfig(bookingMiniProgramConfig);
    }

    /**
     * 通过id批量删除预订小程序设置信息
     *
     * @param ids 需要删除的预订小程序设置主键
     * @return 结果
     */
    @Override
    public int deleteBookingMiniProgramConfigByIds(Long[] ids)
    {
        return bookingMiniProgramConfigMapper.deleteBookingMiniProgramConfigByIds(ids);
    }

    /**
     * 通过id删除预订小程序设置信息
     *
     * @param id 预订小程序设置主键
     * @return 结果
     */
    @Override
    public int deleteBookingMiniProgramConfigById(Long id)
    {
        return bookingMiniProgramConfigMapper.deleteBookingMiniProgramConfigById(id);
    }
}
